From 16c992f80fa6394b4dc5166e6c14129ec4946e12 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Thu, 4 Aug 2022 14:05:07 +0200 Subject: [PATCH] Displaying just one column means pages are arranged vertically Third-party display methods may do that without using a side-window, and therefore they don't set `which-key-popup-type' to `side-window'. Likewise they might not set `which-key-side-window-location', e.g., because their display method only supports one location. `which-key-max-display-columns' being 1 is by itself already enough of an indicator to know that there won't be multiple columns. --- which-key.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/which-key.el b/which-key.el index d9dcf8dee9a..89bdbe86457 100644 --- a/which-key.el +++ b/which-key.el @@ -1972,8 +1972,9 @@ is the width of the live window." (avl-lines (if prefix-top-bottom (- max-lines 1) max-lines)) (min-lines (min avl-lines which-key-min-display-lines)) (avl-width (if prefix (- max-width prefix) max-width)) - (vertical (and (eq which-key-popup-type 'side-window) - (member which-key-side-window-location '(left right)))) + (vertical (or (and (eq which-key-popup-type 'side-window) + (member which-key-side-window-location '(left right))) + (eq which-key-max-display-columns 1))) result) (setq result (which-key--create-pages-1 -- 2.30.2